package com.onion.loan.pojo;

import com.netflix.ribbon.proxy.annotation.Http;
import lombok.Getter;
import lombok.Setter;

/**
 * Created by Administrator on 2018/11/24 0024.
 * 
 */
@Setter
@Getter
public class HttpWrapper<T> {

    private T data;
    private String info;
    private int code;

    public HttpWrapper(String info,int code,T data){
        this.data = data;
        this.info = info;
        this.code = code;
    }

    public static <T> HttpWrapper<T> success(T data){
        return new HttpWrapper("成功",200,data);
    }

    public static <T> HttpWrapper<T>  faild(){
        return new HttpWrapper("失败",201,null);
    }


}
